﻿using UnityEngine;

public class AutoDestroy : MonoBehaviour
{
    public float countdown = 2;

    private float m_StartTime = 0;

    private void Start()
    {
        m_StartTime = Time.time;
    }

    private void Update()
    {
        if (Time.time - m_StartTime > countdown)
        {
            GameObject.Destroy(gameObject);
        }
    }
}
